package cn.wolfcode.p2p.base.query;

import cn.wolfcode.p2p.util.DateUtil;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.util.StringUtils;

import java.util.Date;
@Getter@Setter
public class VideoAuthQuery extends QueryObject {
        @DateTimeFormat(pattern = "yyyy-MM-dd")
        private Date beginDate;
        @DateTimeFormat(pattern = "yyyy-MM-dd")
        private Date endDate;
        private Integer state=-1;//根据申请的状态

        private String username;//根据用户人查申请
        private Long auditorId;//根据审核人ID查相对的视频认证申请

        public String getUsername(){
                return StringUtils.hasLength(username)?username.trim():null;
        }

        public Date getEndDate() {
                return DateUtil.getEndDate(endDate);
        }

}
